package lab02.Test12;

/**
 * Created by lenovo on 2017/10/20.
 */
public class Rectangular extends Shape {
    double length;
    double wide;

    public Rectangular() {
    }

    public Rectangular(double length, double wide) {
        this.length = length;
        this.wide = wide;
    }

    @Override
    public void girth() {
        super.girth();
        double girth = (length + wide) * 2;
        System.out.println("周长为：" + girth);

    }

    @Override
    public void area() {
        super.area();
        double area = length * wide;
        System.out.println("面积为：" + area);
    }
}
